package com.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.bean.Goods;
import com.bean.Seckill;
import com.bean.User;
import com.dao.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @author WxrStart
 * @create 2022-05-17 16:58
 */
public interface IUserService extends IService<User> {


    /**
     *  注册册User用户
     * @return
     */
    Integer addUser(User user);


    /**
     * 根据邮箱查找用户
     * @param email 用户邮箱
     * @return
     */
    User findByEmail(String email);

    /**
     * 根据邮箱和密码查找用户
     * @param email 用户邮箱
     * @param password 用户密码
     * @return
     */
    User findByEmailAndPassword(String email,String password);

    /**
     * 根据秒杀id查找用户
     * @param seckill
     * @return
     */
    User findBySeckill(Seckill seckill);


    /**
     * 根据用户Id修改用户
     * @param userId
     * @return
     */
    Integer updateByUserId(String nickName,String phone,String address,Integer userId);
}
